<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="alert alert-info">
        <strong>提示!</strong> 打开最下面的"通过api审核"按钮,只需选择"会员id",填写"姓名","身份证号码",上传身份正反面,提交后便可自动填写数据。
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-rule="required;remote({:url('/admin/cardocr/card/checkuseridavailable')})"
                   data-source="user/user/index" data-field="nickname" class="form-control selectpage"
                   name="row[user_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Sex')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select id="c-sex" data-rule="required" class="form-control selectpicker" name="row[sex]">
                {foreach name="sexList" item="vo"}
                <option value="{$key}" {in name="key" value="未知" }selected{
                /in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Nation')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-nation" class="form-control" name="row[nation]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Birth')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-birth" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                   data-use-current="true" name="row[birth]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-address" class="form-control" name="row[address]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Idnum')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-idnum"
                   data-rule="required;IDcard;remote({:url('/admin/cardocr/card/checkidcardavailable')})"
                   class="form-control" name="row[idnum]" type="text" value="" placeholder="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Authority')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-authority" class="form-control" name="row[authority]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Validdatestart')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-validdatestart" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                   data-use-current="true" name="row[validdatestart]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Validdateend')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-validdateend" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                   data-use-current="true" name="row[validdateend]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-status" data-rule="required" class="form-control selectpicker" name="row[status]">
                {foreach name="statusList" item="vo"}
                <option value="{$key}" {in name="key" value="2" }selected{
                /in}>{$vo}</option>
                {/foreach}
            </select>
            <!--<input id="c-status" data-rule="required" class="form-control" name="row[status]" type="text" value="">-->
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Positive_img')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-positive_img" class="form-control" size="50" name="row[positive_img]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-positive_img" class="btn btn-danger plupload"
                                  data-input-id="c-positive_img" data-mimetype="image/jpeg,image/png,image/jpg"
                                  data-maxsize="3M" data-multiple="false" data-preview-id="p-positive_img"><i
                            class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-positive_img" class="btn btn-primary fachoose"
                                  data-input-id="c-positive_img" data-mimetype="image/*" data-multiple="false"><i
                            class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-positive_img"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-positive_img"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Back_img')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-back_img" class="form-control" size="50" name="row[back_img]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-back_img" class="btn btn-danger plupload"
                                  data-input-id="c-back_img" data-mimetype="image/jpeg,image/png,image/jpg"
                                  data-multiple="false" data-maxsize="3M" data-preview-id="p-back_img"><i
                            class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-back_img" class="btn btn-primary fachoose"
                                  data-input-id="c-back_img" data-mimetype="image/*" data-multiple="false"><i
                            class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-back_img"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-back_img"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Memo')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-memo" class="form-control" name="row[memo]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Publishtime')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-publishtime" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss"
                   data-use-current="true" name="row[publishtime]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('IsthroughAPI')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-isthroughapi" name="row[isthroughapi]" type="hidden" value="0">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-isthroughapi"
               data-yes="1" data-no="0">
                <i class="fa fa-toggle-on text-success fa-flip-horizontal text-gray fa-2x"></i>
            </a>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
